<link href="<?php echo $this->webroot.'/theme/admin/css/table.css' ?>" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?php echo $this->webroot.'/theme/index/js/jquery.js' ?>"></script>
<script type="text/javascript">
<!--
	$(document).ready(function(){
		<?php
		if($find->getIds()!=0){
			$arr	= explode(',', $find->getIds());
			if(is_array($arr))
			{
				foreach ($arr as $key => $v):?>
				$("#id<?php echo $v; ?>").attr('checked', true);
				<?php endforeach;
			}  
		}
			?>
		$("#ids<?php echo $ids; ?>").attr('checked', true);
		//设置超级管理
	});
//-->
</script>
<form action="" method="post" name="form1">
<table id="mytable" cellspacing="0" summary="The technical specifications of the Apple PowerMac G5 series" width="90%"> 
<caption> </caption> 
  <tr>
    <th scope="col" abbr="Dual 1.8">管理员帐号</th> 
    <th scope="col" abbr="Dual 2">管理员密码</th> 
    <th scope="col" abbr="Dual 2.5">备注</th> 
    <th scope="col" abbr="Configurations" class="">其他操作</th> 
  </tr> 
  
  <tr>
    <td><input name="username" value="<?php echo $find->getUsername() ?>"></td> 
    <td><input name="password"></td> 
<input name="id" type="hidden" value="<?php echo $id; ?>">
    <th scope="[row]" abbr="Model" class="spec"><input name="remark" value="<?php echo $find->getRemark() ?>"></th> 
    <td><input type="submit" value="更新信息"></td> 
  </tr>
  
  
  <tr>
  	<td>超级权限</td> 
    <td colspan="3"><input name="admin" type="radio" id="ids0" value="">普通管理员&nbsp;<input name="admin" type="radio" id="ids1" value="1">超级管理员</td> 
  </tr>
    <tr>
    <th scope="col" abbr="Dual 1.8">主类菜单</th> 
    <th scope="col" abbr="Configurations" class="" colspan="3">子类菜单</th> 
  </tr> 
  
  <!-- 开始循环权限 -->
  <?php foreach ($_SESSION['daohang'][0] as $key => $var): ?>
   <tr> 
    <td><?php echo $var['name']; ?><input id="id<?php echo $var['id']; ?>" name="ids[]" type="checkbox" value="<?php echo $var['id']; ?>"></td> 
    <td colspan="3">
    <?php
    $pid	= $var['id'];
    if(!empty($_SESSION['daohang'][$pid])){

    foreach ($_SESSION['daohang'][$pid] as $keys => $v): ?>
    <input id="id<?php echo $v['id']; ?>" name="ids[]" type="checkbox" value="<?php echo $v['id']; ?>"><?php echo $v['name']; ?>&nbsp;
     <?php endforeach; 
    	}else{
     ?>
     <td colspan="3"></td> 
     <?php } ?>
    
  </tr>
  <?php endforeach; ?>
</table> 
</form>